using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;

/// <summary>
/// Summary description for MyPage
/// </summary>
public class MyPage : Page
{
    public SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["MainDB"].ConnectionString);

    public string GetGmapKey()
    {
        switch (Request.ServerVariables["SERVER_NAME"])
        {
            case "www.crimemaps.com.au":
                return ConfigurationManager.AppSettings["GmapKeyCrimeMaps"];
            case "www.crimeradar.co.uk":
                return ConfigurationManager.AppSettings["GmapKeyCrimeRadarUK"];
            default:
                return ConfigurationManager.AppSettings["GmapKeyKotlyarov"];
        }
    }
}
